linux: Disable idle-loop alternatives.
authorkfraser@localhost.localdomain <kfraser@localhost.localdomain>
Wed, 28 Feb 2007 14:34:25 +0000 (14:34 +0000)
committerkfraser@localhost.localdomain <kfraser@localhost.localdomain>
Wed, 28 Feb 2007 14:34:25 +0000 (14:34 +0000)
ACPI and APM idle functions in particular are not suitable choices
when running on Xen.

Signed-off-by: Keir Fraser <keir@xensource.com>
linux-2.6-xen-sparse/arch/i386/kernel/process-xen.c
linux-2.6-xen-sparse/arch/x86_64/kernel/process-xen.c

index 73b325132fd1bc403039b522c0a0ceb175fc50e7..2225fcc962045028fa49d5589df5c8e1ab10a78a 100644 (file)
@@ -101,7 +101,7 @@ EXPORT_SYMBOL(enable_hlt);
  * to poll the ->work.need_resched flag instead of waiting for the
  * cross-CPU IPI to arrive. Use this option with caution.
  */
-static void poll_idle(void)
+static void poll_idle (void)
 {
        local_irq_enable();
 
@@ -169,10 +169,7 @@ void cpu_idle(void)
                                __get_cpu_var(cpu_idle_state) = 0;
 
                        rmb();
-                       idle = pm_idle;
-
-                       if (!idle)
-                               idle = xen_idle;
+                       idle = xen_idle; /* no alternatives */
 
                        if (cpu_is_offline(cpu))
                                play_dead();
index ada9751fb32e5b340482945168fb23cf565267a0..6a7bf2ed37df30327a532a60695f1d5b2d2c6cb0 100644 (file)
@@ -117,7 +117,7 @@ void exit_idle(void)
  * to poll the ->need_resched flag instead of waiting for the
  * cross-CPU IPI to arrive. Use this option with caution.
  */
-static void poll_idle(void)
+static void poll_idle (void)
 {
        local_irq_enable();
 
@@ -179,9 +179,7 @@ void cpu_idle (void)
                        if (__get_cpu_var(cpu_idle_state))
                                __get_cpu_var(cpu_idle_state) = 0;
                        rmb();
-                       idle = pm_idle;
-                       if (!idle)
-                               idle = xen_idle;
+                       idle = xen_idle; /* no alternatives */
                        if (cpu_is_offline(smp_processor_id()))
                                play_dead();
                        enter_idle();